#ifndef NP_NETPIPE_ROBOTGATHER_H
#define NP_NETPIPE_ROBOTGATHER_H
#include <utils/XFile.h>
#include <config/Structures.h>
#include <dao/DaoArticle.h>
#include <dao/DaoChapter.h>

#define SIZE_CHAPTER_LIST 3000

class RobotGather
{
public:
    RobotGather();
    ~RobotGather();

    void work();

private:
    XFile m_file;

    chapterInfo::ChapterInfo* m_chapterList;

    void getAttachImage( attachInfo::AttachInfo& attach);

    void gatherCover(const std::string& coverLink, const std::string& bookid);

    void gatherChapterContent(const chapterInfo::ChapterInfo& chapter, const std:: string& content);

    void debugNovelInfo(const articleInfo::ArticleInfo& article);

    void debugChapter(const chapterInfo::ChapterInfo& chapter);

};

#endif // NP_NETPIPE_ROBOTGATHER_H
